import request from '@/utils/request'
const userController={
  login: function (data){
    return request({
      url: 'userController/userLogin.jhtml',
      method: 'post',
      data
    })
  },
  loginOut:function(){
    return request({
      url:'/userController/userLogout.jhtml',
      methods:'post'
    })
  },
  register: function (data){//注册
    return request({
      url: '/userController/userRegister.jhtml',
      method: 'post',
      data
    })
  },
  checkUsername: function (data){//检查用户名是否被占用
    return request({
      url: '/userController/checkUsername.jhtml',
      method: 'post',
      data
    })
  },
  checkEamil: function (data){//检查邮箱是否被占用
    return request({
      url: '/userController/checkEamil.jhtml',
      method: 'post',
      data
    })
  },
  getLoginUserInfo: function (){//获取登录用户信息
    return request({
      url: '/userController/getLoginUserInfo.jhtml',
      method: 'get'
    })
  },
  createAuthor: function (data){//新建笔名
    return request({
      url: 'userController/createAuthor.jhtml',
      method: 'post',
      data
    })
  },
  updateRecord: function (data){//修改用户资料
    return request({
      url: '/userController/updateRecord.jhtml',
      method: 'post',
      data
    })
  },
  resetPwd: function (data){//修改密码
    return request({
      url: '/userController/resetPwd.jhtml',
      method: 'post',
      data
    })
  },
  findPwd: function (data){//邮箱找回密码
    return request({
      url: '/userController/findPwd.jhtml',
      method: 'post',
      data
    })
  },
  resetPwdByEmail: function (data){//邮箱链接重置密码
    return request({
      url: '/userController/resetPwdByEmail.jhtml',
      method: 'post',
      data
    })
  },
   checkAuthorName: function (data){//验证笔名，验重
    return request({
      url: '/userController/checkAuthorName.jhtml',
      method: 'post',
      data
    })
  },
   getTotalCount: function (data){//获取消息数量
    return request({
      url: '/messageController/getTotalCount.jhtml',
      method: 'post',
      data
    })
  },
   getTotalList: function (data){//获取消息列表
    return request({
      url: '/messageController/getQueryList.jhtml',
      method: 'post',
      data
    })
  },
}
export default userController
